<!-- @Author: Yu_Bo -->
<template>
	<view class="prompt">
		<u-popup v-model="show" mode="center" :negative-top="200" :mask-close-able="false">
			<view class="main">
				<view class="main_title">提示</view>
				<view class="main_text"><text>{{text}}</text></view>
				<view class="main_btn">
					<view class="btn_txt color_left page_button_close" @click="closeBtn">取消</view>
					<view class="btn_txt color_right page_button" @click="submitBtn">确定</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		components: {},
		props: {
			text: {
				type: String,
				default: ""
			},
		},
		data() {
			return{
				show: false
			}
		},
		computed: {},
		mounted() {},
		methods: {
			// 打开
			openBtn() {
				this.show = true
			},
			// 取消
			closeBtn() {
				this.show = false
			},
			// 确定
			submitBtn() {
				this.show = false
				this.$emit('confirm')
			},
		},
	}
</script>

<style lang='scss' scoped>
	.prompt {
		.main {
			width: 550rpx;
			padding: 40rpx 50rpx;
			border-radius: 40rpx;
			background: #FFFFFF;
			
			.main_title {
				width: 100%;
				text-align: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 36rpx;
				color: #333333;
			}
			
			.main_text {
				width: 100%;
				padding: 40rpx 0 50rpx;
				text-align: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 32rpx;
				color: #999999;
			}
			
			.main_btn {
				width: 100%;
				display: flex;
				align-items: center;
				justify-content: space-between;
				
				.btn_txt {
					width: 210rpx;
					height: 80rpx;
					line-height: 80rpx;
					text-align: center;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 30rpx;
					border-radius: 40rpx;
				}
			}
		}
	}
</style>